#ifndef MIXEREDITSENTENCES_H
#define MIXEREDITSENTENCES_H

#include <QDialog>
#include <QSqlRelationalTableModel>
#include <QRegExpValidator>

namespace Ui {
    class MixerEditSentences;
}

class MixerEditSentences : public QDialog
{
    Q_OBJECT

public:
    explicit MixerEditSentences(QWidget *parent = 0);
    ~MixerEditSentences();

private slots:
    void on_comboBox_SelectTheme_currentIndexChanged(int index);

    void on_pushButton_DeleteSelected_clicked();

    void on_actionNewSentencesChanged_triggered();

    void on_pushButton_SubmitNew_clicked();

    void on_pushButton_CheckGrouping_clicked();

private:
    void fetchAllDataFromDB();
    void searchThisRow(int id=0);
    void themeSelectorsFill();
    bool sentenceGroupingCheck(QString &instring, QString &grpstr, QString &outstring);
    Ui::MixerEditSentences *ui;
    QSqlRelationalTableModel *smodel;
    QRegExpValidator *groupingValidator;
    QRegExpValidator *sentenceValidator;
};

#endif // MIXEREDITSENTENCES_H
